<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>打开关闭一个新网页练习</title>
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<button onclick="c()">打开窗口</button>
			<br><button onclick="cc()">关闭窗口</button>
			<br><button onclick="ccc()">检测窗口是否关闭</button>
			<br><button onclick="ck()">调整宽度</button>
		</div>
		<script type="text/javascript">
			//定义一个接收open返回值
			var d;
			function c(){
				d = window.open("http://www.zzptc.com/Index.html")
			}
			function cc(){
				d.close()
			}
			function ccc(){
				alert(d.closed ? '关闭了':'没关闭')
			}
			function ck(){
				
			}
		</script>
	</body>
</html>
